package com.njbw.design_pattern.struct.proxy.staticProxy.impl;

import lombok.extern.slf4j.Slf4j;

/**
 *
 * @author 黄侯淳
 * @since JDK 1.8
 */
@Slf4j
public class Main {

    public static void main(String[] args) {
        DataQuery dataQuery = new DatabaseDataQuery();
        DataQuery dataQueryProxy = new DatabaseDataQueryProxy(dataQuery);

        String val = dataQueryProxy.query("key1");
        log.info("val={}", val);
        val = dataQueryProxy.query("key1");
        log.info("val={}", val);
        val = dataQueryProxy.query("key1");
        log.info("val={}", val);
    }
}
